package com.tang.model.old;

import com.tang.model.domain.Member;

import java.util.Objects;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/9/2 19:59
 * @Desc
 * @Remarks
 */
public class MemberService {

    public void login(String username, String password) {

        if (Objects.isNull(username) || Objects.isNull(username)) {
            System.out.println("用户名密码不能为空！");
            return;
        }
        System.out.println("校验成功");

        System.out.println("登录成功");
        Member member = new Member(username, password);
        member.setRoleName("管理员");

        if (Objects.equals(member.getRoleName(), "管理员")) {
            System.out.println("有管理权限");
        } else {
            System.out.println("无权限");
        }
    }
}
